import request from "@/utils/request";

const apiUrl = {
  indexList: "/api/exhibit/subject/listpage/1/10",
  tagList: "/api/exhibit/subject/facet/type",
  subjectDetail: "/api/exhibit/subject/",
  entityDetail: "/api/exhibit/entity/",
  allYear: "/api/exhibit/subject/facet/year",
  entityPage: "/api/exhibit/entity/listpage/",
};

export function queryIndex(params) {
  return request({
    url: apiUrl.indexList,
    method: "get",
    params,
  });
}

export function getEntityPage(no, params) {
  return request({
    url: apiUrl.entityPage + no + "/8",
    method: "get",
    params,
  });
}

export function queryTag() {
  return request({
    url: apiUrl.tagList,
    method: "get",
  });
}

export function getYear() {
  return request({
    url: apiUrl.allYear,
    method: "get",
  });
}

export function querySubject(id) {
  return request({
    url: apiUrl.subjectDetail + id,
    method: "get",
  });
}
export function queryEntity(id) {
  return request({
    url: apiUrl.entityDetail + id,
    method: "get",
  });
}
